package p6;

/**
 * @author krystal
 * @date 2022/11/11 12:45
 */

class Student1{
    public String name;
    public String gender;
    public int age;
    public double score;

    public Student1(){
        this.name="伯贤";
        this.gender="male";
        this.age=30;
        this.score=100;
        System.out.println("Student类的无参构造");
    }

    public Student1(String name,String gender,int age,double score){
        System.out.println("Student类的有参构造方法");
        this.name=name;
        this.gender=gender;
        this.age=age;
        this.score=score;
    }

    public void showStudent(){
        System.out.println("name="+name+",gender="+gender+",age="+age+",score="+score);
    }

    public void DoClass(){
        System.out.println("按时上课，不要迟到，如果请假，及时去补！");
    }

    public void DoHomework(){
        System.out.println("教务系统，完成作业，一旦拖沓，神仙难救！");
    }

    public void Exam(){
        System.out.println("考试目的，了解学情，人人必考，暴露问题！");
    }
}

public class Demo1 {
    public static void main(String[] args) {
        Student1 student1=new Student1();
        student1.showStudent();
        student1.DoClass();
        student1.DoHomework();
        student1.Exam();
        System.out.println("=======================");
        Student1 student2=new Student1("暻秀","male",29,100);
        student2.showStudent();
        student2.DoClass();
        student2.DoHomework();
        student2.Exam();
    }
}
